<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../static/js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="../static/js/vue.js"></script>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <div class="alert alert-success">
            <div id="app">
                <table border="2" align="center">
                    <tr>
                        <td>序号</td>
                        <td><input name="id" disabled type="text" value=""/></td>
                    </tr>
                    <tr>
                        <td>型号</td>
                        <td><input name="cupSize" type="text" value="${girl.cupSize}"/></td>
                    </tr>
                    <tr>
                        <td>年龄</td>
                        <td><input name="age" type="text" value="${girl.age}"/></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <input type="submit" value="更新"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    var urlParam= window.location.search;
    var loc = urlParam.substring(urlParam.lastIndexOf('=')+1, urlParam.length);
    var app = new Vue({
        el: '#app',
        data: {
            sites: {}
        },
        created: function () {
            $.ajax({
                url: 'http://localhost:8080/selectOne?id='+loc,
                type: 'post',
                data: {},
                dataType: 'json'
            }).then(function (res) {
                app.sites = res;
            }).fail(function () {
                console.log('失败');
            })
        }
    })
</script>
</html>